package club.banyuan;

public class PrintBThread extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            synchronized (Main.class) {
                try {
                    Main.class.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("B");
                Main.class.notify();
            }
        }
    }
}
